# import time
#
# time_start = time.time()
# file = open('D:/data/E-commerce/data_after_process.txt', 'r', encoding='UTF-8').readlines()
# file_new = open('D:/data/E-commerce/data_after_process_test.txt', 'w', encoding='UTF-8')
# # print(len(file))
# cnt = 0
# for line in file:
#     # line.replace('/t', '')
#     if cnt <= 1000000:
#         file_new.write(line)
#         cnt += 1
#     else:
#         break
# time_end = time.time()
# print(time_end-time_start)
#
import os

fileList = os.listdir('D:/data/E-commerce/midword')
for file in fileList:
    word_line = open('D:/data/E-commerce/midword/' + file, 'r', encoding='UTF-8').readlines()
    print(file)
    for line in word_line:

        word, num = line.split(' ')
        # print(word)

